<?php
/*
*验证用户账号信息
*模拟一个用户表
*/
$USER_INFO_LIST=[
    "aaa@qq.com"=>[
        "email"=>"aaa@qq.com",
        "password"=>"123123",
        "avatar"=>"http://www.authzpm.aa/images/avatar/1.png",
        "nickname"=>"主宰、别样苍茫",
        "sex"=>"male",
        "openID"=>"kjgikjjuuj",
    ],
    "bbb@qq.com"=>[
        "email"=>"bbb@qq.com",
        "password"=>"123123",
        "avatar"=>"http://www.authzpm.aa/images/avatar/2.png",
        "nickname"=>"打开灯光照照暖",
        "sex"=>"female",
        "openID"=>"sffsfgrsfg",
    ],
    "ccc@qq.com"=>[
        "email"=>"ccc@qq.com",
        "password"=>"123123",
        "avatar"=>"http://www.authzpm.aa/images/avatar/3.png",
        "nickname"=>"扯不断的红尘",
        "sex"=>"female",
        "openID"=>"agrfsdgfdgrgfs",
    ],
    "ddd@qq.com"=>[
        "email"=>"ddd@qq.com",
        "password"=>"123123",
        "avatar"=>"http://www.authzpm.aa/images/avatar/4.png",
        "nickname"=>"那个撕心裂肺的叫声",
        "sex"=>"female",
        "openID"=>"sfgrghsrrrsf",
    ],
    "eee@qq.com"=>[
        "email"=>"eee@qq.com",
        "password"=>"123123",
        "avatar"=>"http://www.authzpm.aa/images/avatar/5.png",
        "nickname"=>"我只跟自己比",
        "sex"=>"female",
        "openID"=>"shh5ssrrvghj",
    ],
];
//生成授权码
function createCode()
{
    return "adfdfekculg";
}
function getUserInfoByEmail($email)
{
    global $USER_INFO_LIST;
    if(empty($USER_INFO_LIST[$email]))
    {
        return array();
    }
    return $USER_INFO_LIST[$email];
}